home *** CD-ROM | disk | FTP | other *** search
- " ------------------------------------------------------------------- "
- " Intuition Class is a Singleton class that allows the user to "
- " reference intuition-specific singleton classes in one spot. "
- ""
- " ALL singleton classes MUST contain the following: "
- ""
- " the methods: isSingleton AND privateSetup AND "
- " uniqueInstance Class instance variable. "
- " ------------------------------------------------------------------- "
-
- Class Intuition :Dictionary
- ! uniqueInstance gadgetAttrs gadgetFlags gadgetTypes gadToolsAttrs
- gadgetActs gadgetMethodIDs idcmpFlags screenTags windowFlags
- windowTags specialTags icClass methodIDs imageTags
- menuFlags reqFlags boopsiNames
- !
- [
- isSingleton
- ^ true
- |
- privateNew ! newInstance !
- newInstance <- super new.
- ^ newInstance
- |
- new
- ^ (self privateSetup)
- |
- privateSetup
- (uniqueInstance isNil)
- ifTrue: [uniqueInstance <- self privateNew.
-
- specialTags <- SpecialTags new.
-
- "BOOPSI tag singleton classes:"
- icClass <- ICClass new.
- methodIDs <- MethodIDs new.
- imageTags <- ImageTags new.
- boopsiNames <- BoopsiClassNames new.
-
- "Initialize all Intuition Singleton classes:"
- gadToolsAttrs <- GadToolsAttributes new.
-
- gadgetAttrs <- GadgetAttributes new.
- gadgetMethodIDs <- GadgetMethodIDs new.
- gadgetFlags <- GadgetFlags new.
- gadgetTypes <- GadgetTypes new.
- gadgetActs <- GadgetActivation new.
-
- screenTags <- ScreenTags new.
- windowTags <- WindowTags new.
- windowFlags <- WindowFlags new.
- idcmpFlags <- IDCMPFlags new.
- menuFlags <- MenuFlags new.
- reqFlags <- RequesterFlags new.
- ].
-
- ^ self "uniqueInstance??"
- |
- boopsiClassName: key
- ^ boopsiNames at: key
- |
- requesterFlag: key
- ^ reqFlags at: key
- |
- menuFlag: key
- ^ menuFlags at: key
- |
- specialTag: key
- ^ specialTags at: key
- |
- imageTag: key
- ^ imageTags at: key
- |
- icClass: key
- ^ icClass at: key
- |
- methodIDs: key
- ^ methodIDs at: key
- |
- getGadgetAttr: key
- ^ gadgetAttrs at: key
- |
- getGadToolAttr: key
- ^ gadToolsAttrs at: key
- |
- getGadgetFlag: key
- ^ gadgetFlags at: key
- |
- getGadgetType: key
- ^ gadgetTypes at: key
- |
- getGadgetMethodID: key
- ^ gadgetMethodIDs at: key
- |
- getGadgetActivation: key
- ^ gadgetActs at: key
- |
- getScreenTag: key
- ^ screenTags at: key
- |
- getWindowTag: key
- ^ windowTags at: key
- |
- getIDCMPFlag: key
- ^ idcmpFlags at: key
- |
- getWindowFlag: key
- ^ windowFlags at: key
- ]
-
-